import requests
from requests_ntlm import HttpNtlmAuth

class Session(requests.Session):
    
    def __init__(self, domain, username, passwd):
        super(Session, self).__init__()
        self._domain = domain
        self._username = username
        self._passwd = passwd
        self.auth = HttpNtlmAuth('{}\\{}'.format(domain, username), passwd)
    
    def get_status(self, cluster_id, vc_id, job_id, job_type):
        return self.get(
            'http://philly/api/status?clusterId={}&vcId={}&jobId={}&jobType={}&content=full'.format(
                cluster_id,
                vc_id,
                job_id,
                job_type
            )
        )


